#!/bin/bash
configure_file=/etc/yc-configs/yc-sys.conf

str=`grep -Insr "CHIP=" $configure_file`
value=`echo $str | awk -F = '{print $2}'`

if [ $value = "RK" ]; then
	mount /dev/mmcblk0p2 /boot
else
	mount /dev/mmcblk0p1 /boot
fi

str=`grep -Insr "only_one=" $configure_file`

if [ "$str" = "" ];then
	resize2fs /dev/mmcblk0p3  #目前只支持RK
	dpkg -i /opt/yckj-qt.deb
	echo "only_one=ok" >> $configure_file
fi
